﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;
using Common.Net.DesignByContract;

namespace ClearUnit.TestRunners.Starts
{
    public sealed class MethodRunStart : TestRunStart
    {
        readonly MethodInfo _method;

        public MethodInfo Method
        {
            get { return _method; }
        }

        public Type Fixture
        {
            get { return Method.ReflectedType; }
        }

        public MethodRunStart(MethodInfo method)
        {
            RequireArg.NotNull(() => method);

            _method = method;
        }

        public override string ShortDescription
        {
            get { return string.Format("Start test {0}.{1}", Fixture.Name, Method.Name); }
        }
    }
}
